<?php
	$css_list[0]['url'] = './tpl/css/imagewall.css';
	$css_list[1]['url'] = './tpl/css/album.css';
	$js_list[0] = './tpl/js/album.js';
    $js_list[1] = './tpl/js/im_004.js';
?>
<!--{template inc/header}-->
<div id="content">
	<div class="sharelist" id="topchannel">
    	<div class="sheet2 cf mr0" <!--{if $_FANWE['uid'] != $home_uid}--> style="background-position:bottom;height:56px;" <!--{/if}-->>	
		<div class="floatright2">
            <span class="sheetbt">    
            <!--{if $_FANWE['uid'] == $home_uid}-->
            	<a id="edit" class="edit2" href="javascript:void(0)" onclick="$.Edit_Album({$album['id']})">编辑专辑<span></span></a>
            <!--{elseif $is_follow_album}-->
            	<a id="add_flo" style="margin-top:0;" class="edit3" href="javascript:void(0)" onclick="$.Follow_Album({$album['id']},this)" >取消关注<span></span></a>
            <!--{else}-->
                <a  id="n_add_flo" onclick="$.Follow_Album({$album['id']},this)" class="edit3" href="javascript:void(0)" style="display: inline-block; margin-top:0; ">关注<span></span></a>
            <!--{/if}-->
            </span>
            
            <span class="sheetbt">
           		<!--{eval $invite_title = $album['title'];}-->
                <!--{eval $invite_content = '这个杂志值得一看'.$album['title'].'('.$home_user['shares'].'个采集)';}-->
                <!--{eval $invite_types = array('douban','sina','qzone');}-->
                <!--{eval $invite_url = $_FANWE['site_url'].$album_url;}-->
                <!--{eval $invite_pic = $_FANWE['site_url'].$share_detail['share_img_org'];}-->
                <!--{eval $sns_links = getSnsLink($invite_types,$invite_title,$invite_url,$invite_content,$invite_pic);}-->
                <!--{if $_FANWE['uid'] != $home_uid}-->
                    <!--<a id="board_share_unit" href="#" onclick="return false;" class="btn wbtn">
                        <ul class="clearfix">
                            <li alt="新浪微博" class="sina" onclick="share_func('{$sns_links['sina']}');">微博</li>
                            <li alt="豆瓣说" class="douban" onclick="share_func('{$sns_links['douban']}');">豆瓣</li>
                            <li alt="QQ空间" class="qzone" onclick="share_func('{$sns_links['qzone']}');">Qzone</li>
                        </ul>
                        <strong> 分享到</strong>
                        <span></span>
                    </a>-->
                <!--{/if}-->
			</span>
		</div>
        <!--{if $_FANWE['uid'] == $home_uid}-->
        	<span class="sheetname2">{$album['title']}</span>
        <!--{else}-->
        	<div class="zhuanji-img">
            	<div class="face-bg"><img src="/tpl/huaban/images/face-img.png" width="46" height="46"></div>
                <div class="face-name">
                    <h1 style="font-size:24px; color:#333333; font-weight:normal;">{$album['title']}</h1>
                    <p>2012.05.09<span style="color:#333333; margin-left:5px;">10天</span></p>
                </div>
            </div>
        <!--{/if}-->
        </div>
	</div>
    <div style="clear:both"></div>
    <div id="contentMain" class="content" style="position:relative; margin-top:16px;">
         <!--预加载数据-->
    <!--{loop $list $share}-->
    <div class="imBoard rightbox" dataid = "{$share['share_id']}">
    	<div class="pin">
        	<div class="modify">
                <div class="show-img" style="height:{$share['height']}px;">
                	<a href="{$share['share_url']}" target="_blank">
                    	<img class="picUrl" height="{$share['height']}" src="{$share['share_img']}" width="222">
						{if $share['is_video']}
							<img src="{$_FANWE['site_root']}tpl/{$_FANWE['setting']['site_tmpl']}/images/play.gif" class='play' style='margin: {$share['video_style_top']}px 0 22px -{$share['video_style_right']}px;' />
						{/if}
                    </a>
                </div>
                <div class="title-sign">
                	<p class="contentsms">{$share['content']}</p>
                    <p class="quantity" style="display:{if $share['relay_count'] == 0 && $share['comment_count'] == 0 && $share['collect_count'] == 0} none{/if};">
                    	<span style="display:{if $share['replay_count'] == 0}none;{else}inline-block;{/if}">
                        	<span>转发</span>
                            <span class="reshareNum">{$share['replay_count']}</span>
                        </span>&nbsp;
            			<span style="{if $share['comment_count'] == 0}display:none;{else}display:inline-block;{/if}">
                        	<span class="pointsNum">·</span>
                            <span>评论</span>
                            <span class="commentNum">{$share['comment_count']}</span>
                        </span>&nbsp;
                        <span style="{if $share['collect_count'] == 0}display:none;{else}display:inline-block;{/if}">
                        	<span class="pointsNum">·</span>
                            <span>喜欢</span>
                            <span class="likeNum">{$share['collect_count']}</span>
                        </span>
                    </p>
              	</div>
                <ul class="comentMain">
                	<li class="hover cf">
                    	<div class="uhead" style="height:30px;">
                        	<a href="{$share['u_url']}">
                            	<img src="{$share['avt']}">
                           	</a>
                       	</div>
                        <div class="uinfo">
                        	<p>
                            	<a href="{$share['u_url']}" class="gray">{$share['user_name']}</a> 
                                {if $share['isOriginal'] == 1}分享到{else}转发到{/if} 
                                <a href="{$share['album_url']}" class="gray">{$share['album_title']}</a>
                           	</p>
                        </div>
                    </li>
                    <!--{if count($share['comments']) > 0}-->
                    	{loop $share['comments'] $comment}
                        	<li class="cf">
                            	<div class="uhead" style="height:30px;">
                        			<a href="{$comment['user_url']}"><img src="{$comment['avt']}" /></a>
                                </div>
                                <div class="uinfo">
                                	<p>
                                    	<a href="{$comment['user_url']}" class="gray">{$comment['user_name']}</a>
                                    </p>
                                    <p class="recoment" commentId="{$comment['comment_id']}">
                                    	{$comment['comment']}&nbsp;<a class="gray">回复</a>
                                    </p>
                                </div>
                            </li>
                        {/loop}
                    <!--{/if}-->
                    
                </ul>
                <div class="postcomment" style="display:none;" parent_id="0">
                	<div class="cf title">
                    	<a href="javascript:void(0)" class="x commentClose">关闭</a>
                        添加评论
                    </div>
                    <div class="cf">
                    	<div class="uhead" style="height:30px;">
                        	<a href="{$current_user['u_url']}"><img src="{$current_user['avt']}"></a>
                       	</div>
                        <div class="commentbody">
                        	<span class="innerborder">
                            	<textarea class="commentTextarea" maxlength="140"></textarea>
                            </span>
                            <div class="submit cf">
                            	<span class="floatright count">
                                	<em class="lightblue">0</em>/140
                                </span>
                                <a class="unpincomment" href="javascript:void(0);">提交</a>
                            </div>
                       </div>
                  	</div>
              	</div>
                <div class="actions">
                    <div class="left">
                		<a haref="javascript:;" onclick="$.Relay_Share({$share['share_id']})" class="repin btn btn11 wbtn"><strong><em></em>转采</strong>
                        <span></span>
                        </a>
                    </div>
                    
                    <div class="right">
                    	<a class="comment clickable btn btn11 wbtn"><strong><em></em>评论</strong><span></span></a>
                        <!--{if $share['isMe']}-->
                            <a href="javascript:;" class="like btn btn11 wbtn" onclick="$.Edit_Share({$share['share_id']})"><strong><em></em>编辑</strong><span></span></a>
                        <!--{elseif $share['likeStatus']}-->
                            <a  parent_id = {$share['parent_id']} share_id = {$share['share_id']} size=32 st='like' class="like btn btn11 wbtn"><strong><em></em>取消喜欢</strong><span></span></a>
                        <!--{else}-->
                             <a  parent_id = {$share['parent_id']} share_id = {$share['share_id']} size=32 st='unlike'  class="like btn btn11 wbtn"><strong><em></em>喜欢</strong><span></span></a>
                        <!--{/if}-->
                    </div>
                    
                </div>
           	</div>
      	</div>
    </div>  
    <!--{/loop}-->
    </div>
</div>

<div id="imloading" class="firstload" style="display:none;"><img src="./tpl/images/loading-footer.gif" /><span>加载中…</span></div>
<div id="firstload" class="firstload" style="display:none;">没有更多分享…</div>

<script>
jQuery(function($){
$("#board_share_unit").hover(function(){
	$("#board_share_unit ul").css("visibility","visible");
},function(){
	$("#board_share_unit ul").css("visibility","hidden");
});				

var linkUrl = '{$link_url}',jsonUrl = '{$json_url}';
linkUrl = linkUrl +"&v=" +Math.random()*99999999;
autoLayout.init({
contentID:"contentMain",
rightLoad:true,
leftID:[],
rightID:[],
linkUrl:linkUrl,
pageAuto: true,
loadingID:"imloading"
});
autoLayout.eachAction(jsonUrl);
});

function UpdateUserFollow(obj,result)
{
	if(result.status == 1)
	{
		
		$(obj).removeClass("addin").addClass("unaddin").html("已关注");
	}
	else
	{
		$(obj).removeClass("unaddin").addClass("addin").html("关注");
	}
	
}

function share_func(url)
{
	window.open(url);
}

</script>
<!--{template inc/footer}-->
